package com.traceability.controller;

import com.traceability.dao.MenuMapper;
import com.traceability.dao.NodeMapper;
import com.traceability.entity.Node;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
@RequestMapping("/test")
public class TestController {

    @Autowired
    private MenuMapper menuMapper;
    @Autowired
    private NodeMapper nodeMapper;

    @GetMapping("/login")
    public String login() {
        System.out.println(menuMapper.selectByIds());
        return "hello";
        }
    @GetMapping("/uptracing")
    public List<Node> uptracing(String eventId, String eventType) {
       return nodeMapper.selectByIds();
    }

}
